package net.zdsoft.wpchat.android.util;

import org.springframework.beans.factory.config.AbstractFactoryBean;

import net.zdsoft.keel.cache.Cache;
import net.zdsoft.keel.cache.provider.SimpleCache;

/**
 * 用于动态创建 Cache 对象的 FactoryBean，现在默认使用本地缓存
 * 
 * @author xuan
 * @version $Revision: 1.0 $, $Date: 2014-9-22 下午10:41:49 $
 */
public class CacheProviderFactoryBean extends AbstractFactoryBean<Cache<String, Object>> {
    private String servers;

    @Override
    protected Cache<String, Object> createInstance() throws Exception {
        return new SimpleCache();
    }

    @Override
    public Class<?> getObjectType() {
        return Cache.class;
    }

    public String getServers() {
        return servers;
    }

    public void setServers(String servers) {
        this.servers = servers;
    }

}
